package com.university.vo;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Parttime entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "parttime", catalog = "university")

public class Parttime implements java.io.Serializable {

	// Fields

	private Integer partTimeId;
	private Parttimetype parttimetype;
	private Company company;
	private String partTimeTitle;
	private Integer partTimeNeenCount;
	private String partTimeWorkAdderss;
	private Timestamp partTimeBeginTime;
	private Timestamp partTimeEndTime;
	private Timestamp partTimeInputTime;
	private Timestamp partTimeLastUpdateTime;
	private Integer partTimeApplyCount;
	private Integer partTimeSanCount;
	private String partTimeSettleType;
	private Double partTimeMoney;
	private Boolean partTimeIsClose;
	private String partTimeInfo;
	private Boolean partTimeEnable;
	private Set<Companycomment> companycomments = new HashSet<Companycomment>(0);
	private Set<Parttimestudent> parttimestudents = new HashSet<Parttimestudent>(0);

	// Constructors

	/** default constructor */
	public Parttime() {
	}

	@Override
	public String toString() {
		return "Parttime [partTimeId=" + partTimeId + ", parttimetype=" + parttimetype + ", company=" + company
				+ ", partTimeTitle=" + partTimeTitle + ", partTimeNeenCount=" + partTimeNeenCount
				+ ", partTimeWorkAdderss=" + partTimeWorkAdderss + ", partTimeBeginTime=" + partTimeBeginTime
				+ ", partTimeEndTime=" + partTimeEndTime + ", partTimeInputTime=" + partTimeInputTime
				+ ", partTimeLastUpdateTime=" + partTimeLastUpdateTime + ", partTimeApplyCount=" + partTimeApplyCount
				+ ", partTimeSanCount=" + partTimeSanCount + ", partTimeSettleType=" + partTimeSettleType
				+ ", partTimeMoney=" + partTimeMoney + ", partTimeIsClose=" + partTimeIsClose + ", partTimeInfo="
				+ partTimeInfo + ", partTimeEnable=" + partTimeEnable + ", companycomments=" + companycomments
				+ ", parttimestudents=" + parttimestudents + "]";
	}

	/** full constructor */
	public Parttime(Parttimetype parttimetype, Company company, String partTimeTitle, Integer partTimeNeenCount,
			String partTimeWorkAdderss, Timestamp partTimeBeginTime, Timestamp partTimeEndTime,
			Timestamp partTimeInputTime, Timestamp partTimeLastUpdateTime, Integer partTimeApplyCount,
			Integer partTimeSanCount, String partTimeSettleType, Double partTimeMoney, Boolean partTimeIsClose,
			String partTimeInfo, Boolean partTimeEnable, Set<Companycomment> companycomments,
			Set<Parttimestudent> parttimestudents) {
		this.parttimetype = parttimetype;
		this.company = company;
		this.partTimeTitle = partTimeTitle;
		this.partTimeNeenCount = partTimeNeenCount;
		this.partTimeWorkAdderss = partTimeWorkAdderss;
		this.partTimeBeginTime = partTimeBeginTime;
		this.partTimeEndTime = partTimeEndTime;
		this.partTimeInputTime = partTimeInputTime;
		this.partTimeLastUpdateTime = partTimeLastUpdateTime;
		this.partTimeApplyCount = partTimeApplyCount;
		this.partTimeSanCount = partTimeSanCount;
		this.partTimeSettleType = partTimeSettleType;
		this.partTimeMoney = partTimeMoney;
		this.partTimeIsClose = partTimeIsClose;
		this.partTimeInfo = partTimeInfo;
		this.partTimeEnable = partTimeEnable;
		this.companycomments = companycomments;
		this.parttimestudents = parttimestudents;
	}

	// Property accessors
	@Id
	@GeneratedValue

	@Column(name = "partTime_id", unique = true, nullable = false)

	public Integer getPartTimeId() {
		return this.partTimeId;
	}

	public void setPartTimeId(Integer partTimeId) {
		this.partTimeId = partTimeId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "partTime_partTimeTypeId")

	public Parttimetype getParttimetype() {
		return this.parttimetype;
	}

	public void setParttimetype(Parttimetype parttimetype) {
		this.parttimetype = parttimetype;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "partTime_companyId")

	public Company getCompany() {
		return this.company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	@Column(name = "partTime_title", length = 200)

	public String getPartTimeTitle() {
		return this.partTimeTitle;
	}

	public void setPartTimeTitle(String partTimeTitle) {
		this.partTimeTitle = partTimeTitle;
	}

	@Column(name = "partTime_neenCount")

	public Integer getPartTimeNeenCount() {
		return this.partTimeNeenCount;
	}

	public void setPartTimeNeenCount(Integer partTimeNeenCount) {
		this.partTimeNeenCount = partTimeNeenCount;
	}

	@Column(name = "partTime_workAdderss", length = 200)

	public String getPartTimeWorkAdderss() {
		return this.partTimeWorkAdderss;
	}

	public void setPartTimeWorkAdderss(String partTimeWorkAdderss) {
		this.partTimeWorkAdderss = partTimeWorkAdderss;
	}

	@Column(name = "partTime_beginTime", length = 19)

	public Timestamp getPartTimeBeginTime() {
		return this.partTimeBeginTime;
	}

	public void setPartTimeBeginTime(Timestamp partTimeBeginTime) {
		this.partTimeBeginTime = partTimeBeginTime;
	}

	@Column(name = "partTime_endTime", length = 19)

	public Timestamp getPartTimeEndTime() {
		return this.partTimeEndTime;
	}

	public void setPartTimeEndTime(Timestamp partTimeEndTime) {
		this.partTimeEndTime = partTimeEndTime;
	}

	@Column(name = "partTime_inputTime", length = 19)

	public Timestamp getPartTimeInputTime() {
		return this.partTimeInputTime;
	}

	public void setPartTimeInputTime(Timestamp partTimeInputTime) {
		this.partTimeInputTime = partTimeInputTime;
	}

	@Column(name = "partTime_lastUpdateTime", length = 19)

	public Timestamp getPartTimeLastUpdateTime() {
		return this.partTimeLastUpdateTime;
	}

	public void setPartTimeLastUpdateTime(Timestamp partTimeLastUpdateTime) {
		this.partTimeLastUpdateTime = partTimeLastUpdateTime;
	}

	@Column(name = "partTime_applyCount", insertable = false)

	public Integer getPartTimeApplyCount() {
		return this.partTimeApplyCount;
	}

	public void setPartTimeApplyCount(Integer partTimeApplyCount) {
		this.partTimeApplyCount = partTimeApplyCount;
	}

	@Column(name = "partTime_sanCount", insertable = false)

	public Integer getPartTimeSanCount() {
		return this.partTimeSanCount;
	}

	public void setPartTimeSanCount(Integer partTimeSanCount) {
		this.partTimeSanCount = partTimeSanCount;
	}

	@Column(name = "partTime_settleType", length = 10)

	public String getPartTimeSettleType() {
		return this.partTimeSettleType;
	}

	public void setPartTimeSettleType(String partTimeSettleType) {
		this.partTimeSettleType = partTimeSettleType;
	}

	@Column(name = "partTime_money", precision = 22, scale = 0)

	public Double getPartTimeMoney() {
		return this.partTimeMoney;
	}

	public void setPartTimeMoney(Double partTimeMoney) {
		this.partTimeMoney = partTimeMoney;
	}

	@Column(name = "partTime_isClose", insertable = false)

	public Boolean getPartTimeIsClose() {
		return this.partTimeIsClose;
	}

	public void setPartTimeIsClose(Boolean partTimeIsClose) {
		this.partTimeIsClose = partTimeIsClose;
	}

	@Column(name = "partTime_info", length = 5000)

	public String getPartTimeInfo() {
		return this.partTimeInfo;
	}

	public void setPartTimeInfo(String partTimeInfo) {
		this.partTimeInfo = partTimeInfo;
	}

	@Column(name = "partTime_enable", insertable = false)

	public Boolean getPartTimeEnable() {
		return this.partTimeEnable;
	}

	public void setPartTimeEnable(Boolean partTimeEnable) {
		this.partTimeEnable = partTimeEnable;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "parttime")

	public Set<Companycomment> getCompanycomments() {
		return this.companycomments;
	}

	public void setCompanycomments(Set<Companycomment> companycomments) {
		this.companycomments = companycomments;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "parttime")

	public Set<Parttimestudent> getParttimestudents() {
		return this.parttimestudents;
	}

	public void setParttimestudents(Set<Parttimestudent> parttimestudents) {
		this.parttimestudents = parttimestudents;
	}

}